import axios from 'axios'

// https://api-hmugo-web.itheima.net/api/public/v1/categories
function getData() {
  return fetch("https://api-hmugo-web.itheima.net/api/public/v1/categories", {
    method: "GET"
  })
}


function getData2() {
  let data
  axios.get('https://api-hmugo-web.itheima.net/api/public/v1/categories').then(res => {
    data = res
  })
  console.log(data);
  return data
}


export {
  getData,
  getData2
}